package io;

import java.io.*;

/**
 * 适用对象输入流进行对象反序列化
 */
public class ObjectInputStreamDemo {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        FileInputStream fis=new FileInputStream("person.obj");
        ObjectInputStream ois=new ObjectInputStream(fis);
        Person p=(Person) ois.readObject();
        System.out.println(p);
        ois.close();
    }
}
